package com.eight.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * @author 郭坤
 * @since 2023-02-24
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tbCarInsurance", description="车辆信息实体类")
@TableName(value = "tb_car_insurance")
public class TbCarInsurance implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @TableField(value = "id")
    private Integer id;

    @ApiModelProperty(value = "类型")
    @TableField(value = "type")
    private String type;

    @ApiModelProperty(value = "车号")
    @TableField(value = "number")
    private Integer number;

    @ApiModelProperty(value = "购买日期")
    @TableField(value = "buy_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDate buyDate;

    @ApiModelProperty(value = "地盘号")
    @TableField(value = "chassis_number")
    private String chassisNumber;

    @ApiModelProperty(value = "发动机号")
    @TableField(value = "engine_number")
    private String engineNumber;


    @ApiModelProperty(value = "开始")
    @TableField(value = "seats")
    private Integer seats;

    @ApiModelProperty(value = "保险金额")
    @TableField(value = "insured_amount")
    private BigDecimal insuredAmount;

    @ApiModelProperty(value = "第三者责任险")
    @TableField(value = "thirdParty_liability")
    private String thirdPartyLiability;

    @ApiModelProperty(value = "乘客险")
    @TableField(value = "passenger_liability")
    private String passengerLiability;

    @ApiModelProperty(value = "保费")
    @TableField(value = "premium")
    private BigDecimal premium;

    @ApiModelProperty(value = "开始日期")
    @TableField(value = "start_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDate startTime;

    @ApiModelProperty(value = "结束日期")
    @TableField(value = "end_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDate endTime;

    @ApiModelProperty(value = "保险公司名称")
    @TableField(value = "company_name")
    private String companyName;


}
